using System.Collections;
using System.Collections.Generic;
using Hotran.SaveSystem;
using UnityEngine;

public class FallDetector : MonoBehaviour
{
    [SerializeField]
    private SceneLoader _sceneLoader;


    private void OnBecameInvisible()
    {
        Invoke(nameof(Restart), 1f);
    }

    private void Restart()
    {
        _sceneLoader.GameOver();
    }
}
